<template>
  <view :class="theme">
    <view class="m-30 relative">
      <u-image radius="16" width="100%" height="250" src="/static/img/bg-transfer.png" />
      <view class="absolute width-100percent height-100percent jc-sb p-30">
        <view>
          <text class="color-14 fs-22">星核余额</text>
          <text class="mt-6 fs-40 color-27 fw-700">{{ Number(userInfo.coin || "0.00").toFixed(2) }}</text>
        </view>
        <view class="mt-12">
          <text class="color-14 fs-22">USDT</text>
          <text class="mt-6 fs-40 color-27 fw-700">{{ Number(0).toFixed(2) }}</text>
        </view>
      </view>
    </view>

    <view class="bg-21 br-12" style="margin: 0 30rpx 30rpx; padding: 40rpx 16rpx;">
      <text class="fs-36 color-2 mb-12 fw-700">提现到我的账户</text>
      <view class="ml-12 mr-12">
        <text class="color-2 mb-16 mt-30">收款地址</text>
        <u-input placeholder="长按粘贴" fontSize="30" border="none" customStyle="background-color: #1d1d1d; padding: 20rpx;"
          :color="$config.COLOR_10" placeholderClass="color-27 opacity-06" />
      </view>
      <view class="ml-12 mr-12">
        <text class="color-2 mb-16 mt-30">金额</text>
        <u-input placeholder="1.00" fontSize="30" border="none" customStyle="background-color: #1d1d1d; padding: 20rpx;"
          :color="$config.COLOR_10" placeholderClass="color-27 opacity-06" />
      </view>
    </view>

    <button disabled class="bg-6 fs-32 color-2 br-12 fw-600 lh-88" style="margin: 30rpx; padding: 0 24rpx;">
      主网上线后才可提现
    </button>
  </view>
</template>

<script lang="ts" setup>
import { useMapState } from "@/common/libs/store";
import { onLoad } from "@dcloudio/uni-app";
import { ref } from "vue";

const { $config = {} } = getApp().globalData || {};
const { theme } = useMapState(["theme"]);
const userInfo = ref<AnyObject>({});

onLoad(() => {
  getUserInfo();
});

const getUserInfo = () => {
  uni.request({
    url: $config.API_USER_INFO_GET,
    success({ data }: any) {
      uni.hideToast();
      userInfo.value = data;
    }
  });
}

</script>

<style lang="scss">
page {
  background-color: #101010;
  color: $uni-text-color-otc;
}
</style>